//API端点配置
class ApiEndpoints{
  static const baseUrl = 'https://jsonplaceholder.typicode.com';
  //用户相关
  static const getUsers = '$baseUrl/users';
  static String getUser(int id) =>'$baseUrl/users/$id';
  static const createUser = '$baseUrl/users';

  // 文件上传
  static const uploadFile = '$baseUrl/upload';

  //post
  static const getPosts = '$baseUrl/posts';
  static String getPost(int id) =>'$baseUrl/posts/$id';
  static String getCommentsForPost(int postId) => '$baseUrl/posts/$postId/comments';

  //comment
  static const getComments = '$baseUrl/comments';
  static String getComment(int id) =>'$baseUrl/comments/$id';  //同一个接口用put get delete是不同的功能，详情看comment_service.dart

  // 其他端点
  static const searchEndpoint = '$baseUrl/search';
}